package day20170417.abnormal;

import org.junit.Test;

public class AbnormalTest {
	/**
	 * 异常处理
	 * @throws Exception
	 */
	@Test
	public void abnormalTest() throws Exception {
		int a = 10;
		int b = 0;
		try {
			int c = a/b;
			System.out.println(c);
		} catch (Exception e) {
			System.out.println("分母不能等于0");
		}finally {
			System.out.println("一定会执行");
		}
	}
}
